package org.example.elasticsearch;

import org.example.elasticsearch.domain.ESDoc;
import org.example.elasticsearch.domain.LgyzCustTaskBaseSubcontractDoc;
import lombok.Getter;

/**
 * @author: sql
 * @date: 2024/6/7
 * @Description: 全部的 es 索引位置
 * @version: 1.0
 */
@Getter
public enum ESIndexEnum implements ESIndex {

    ES_TASK_INDEX_NAME("task_subcontract_list", LgyzCustTaskBaseSubcontractDoc.class, "taskProxyId"),

    ;

    /**
     * 索引
     */
    private final String indexName;

    /**
     * 文档类
     */
    private final Class<? extends ESDoc> esDocClass;

    /**
     * 主键字段
     */
    private final String pkField;

    ESIndexEnum(String indexName, Class<? extends ESDoc> esDocClass, String pkField) {
        this.indexName = indexName;
        this.esDocClass = esDocClass;
        this.pkField = pkField;
    }

}
